<template>
  <div>
    <button @click="getHQ">getHQ</button>
    {{ this.$store.state.dataHQ }}
    <el-input
      v-model="input"
      placeholder="请输入股票代码"
      style="width:200px;"
    ></el-input>
    <el-button @click="findHQ">查找</el-button>
  </div>
</template>
<script>
import { createSocketHQ } from '../assets/js/websocketHQ.js'
export default {
  data() {
    return {
      input: ''
    }
  },
  methods: {
    getHQ() {
      createSocketHQ('ws://112.124.67.119:6060/test')
    },
    findHQ() {
      this.$store.state.HQ = this.input
    }
  }
}
</script>
<style lang="less" scoped></style>
